package com.lyf.servlets;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @AUTHOR LYF
 * @DATE 2022/5/27
 * @VERSION 1.0
 * @DESC
 */

public class TestServlet extends HttpServlet {
//    public TestServlet() {
//        super();
//    }

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("hello get");
       // super.doGet(req, resp);
        resp.getWriter().write("hello web mvc!");
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("hello post");
        super.doPost(req, resp);
    }

}
